class Tpshopcommon:
    # 断言登录接口
    @classmethod
    def common_assert(cls, resp, state_code, code, msg):
        assert state_code == resp.status_code
        assert code == resp.json()["status"]
        assert msg == resp.json()["msg"]


class TpshopRegister:
    # 断言注册接口
    @classmethod
    def register_assert(cls, resp, state_code, code, msg):
        assert state_code == resp.status_code
        assert code == resp.json()["status"]
        assert msg == resp.json()["msg"]


class Ihrmcommon:
    # 断言登录接口
    @classmethod
    def login_common(cls, resp, state_code, success, code, message):
        assert resp.status_code == state_code
        assert resp.json()["success"] == success
        assert resp.json()["code"] == code
        assert resp.json()["message"] == message


class IhrmAdd:
    # 断言添加员工接口
    @classmethod
    def add_assert(cls, resp, state_code, success, code, message):
        assert resp.status_code == state_code
        assert resp.json()["success"] == success
        assert resp.json()["code"] == code
        assert resp.json()["message"] == message


class IhrmSearch:
    # 断言查找员工接口
    @classmethod
    def search_assert(cls, resp, state_code, success, code, message):
        assert resp.status_code == state_code
        assert resp.json()["success"] == success
        assert resp.json()["code"] == code
        assert resp.json()["message"] == message


class IhrmUpdate:
    # 断言修改员工接口
    @classmethod
    def update_assert(cls, resp, state_code, success, code, message):
        assert resp.status_code == state_code
        assert resp.json()["success"] == success
        assert resp.json()["code"] == code
        assert resp.json()["message"] == message


class IhrmDelete:
    # 断言删除员工接口
    @classmethod
    def delete_assert(cls, resp, state_code, success, code, message):
        assert resp.status_code == state_code
        assert resp.json()["success"] == success
        assert resp.json()["code"] == code
        assert resp.json()["message"] == message
